<h2>{{ text_instruction }}</h2>
<div class="border rounded p-3 mb-3">
  <p><b>{{ text_payable }}</b></p>
  <p>{{ payable }}</p>
  <b>{{ text_address }}</b>
  <br/>
  <p>{{ address }}</p>
  <p>{{ text_payment }}</p>
</div>
<div class="d-inline-block pt-2 pd-2 w-100 text-end">
  <button type="button" id="button-confirm" data-loading-text="{{ text_loading }}" class="btn btn-primary">{{ button_confirm }}</button>
</div>
<script type="text/javascript"><!--
$('#button-confirm').on('click', function() {
    var element = this;

    $.ajax({
        url: 'index.php?route=extension/opencart/payment/cheque|confirm',
        dataType: 'json',
        beforeSend: function() {
            $(element).button('loading');
        },
        complete: function() {
            $(element).button('reset');
        },
        success: function(json) {
            if (json['redirect']) {
                location = json['redirect'];
            }
        },
        error: function(xhr, ajaxOptions, thrownError) {
            alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
        }
    });
});
//--></script>
